Enable clippy::clone_on_ref_ptr lint and fix all violations#7262
Enable clippy::clone_on_ref_ptr lint and fix all violations#7262joseph-isaacs merged 1 commit intodevelopfrom
Conversation
Arc::clone looks likeArc::clone over x.clone where x is an Arc
|
@claude search if any bug sneaked into this pr |
|
Claude finished @0ax1's task in 10m 34s —— View job Bug Hunt:
|
Arc::clone over x.clone where x is an ArcAdds `clone_on_ref_ptr = "deny"` to workspace clippy lints, enforcing explicit `Arc::clone(&x)` instead of `x.clone()` on ref-counted pointers to make refcount bumps visually distinct from deep clones. Signed-off-by: Joseph Isaacs <joseph@spiraldb.com> Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
136811f to
80a2419
Compare
Summary
clone_on_ref_ptr = "deny"to[workspace.lints.clippy]in the rootCargo.tomlx.clone()onArc/Rc/Weakwith explicitArc::clone(&x)(or turbofishArc::<T>::clone(&x)where type coercion is needed)#[allow]suppressions anywhere